package about_attributes.demo2;

import how_to_start_thread.demo2.MyThread;

/**
 * @author yuisama
 * @date 2022/10/01 14:55
 **/
public class Main {
    private static class MyThread extends Thread{
        @Override
        public void run() {
            System.out.println("随便写的");
        }
    }
    public static void main(String[] args) {
        Thread main = Thread.currentThread();
//
//        Thread.State state = main.getState();
//        //得到的当前线程的状态
//        System.out.println(state);


        MyThread t = new MyThread();
        System.out.println(t.getState());//还未start(),当前是new 状态
        t.start();
        System.out.println(t.getState());//此时是runnable状态
    }
}

